<extend name="Index::index" />
<block name="table">
	<div class="agoods_nav">
		<span>商品列表</span>
	</div>
	<a href="{:U('Goods/add')}"><button style="width:100px;height:40px;border:none;background:#DC5448;">添加商品</button></a>
	<table class="table"  border="1" cellspacing="0" cellpadding="5" align="center">
		<tr>
			<th colspan="8">
				<form action="{:U('Goods/like')}"  method="get" >
				<input type="text" name="like" value="{$like}" />
				<button>搜索</button>
				</form>
			</th>
		</tr>

		<tr bgcolor="#ccc">
			<th>编号</th>
			<th>商品名</th>
			<th>图片</th>
			<th>价格</th>
			<th>上架</th>
			<th>热销</th>
			<th>新品</th>
			<th>操作</th>
		</tr>
		<foreach name="list" item="val">
			<tr>
				<td>{$val['gid']}</td>
				<td>{$val['gname']}</td>
				<td><img src="__ROOT__{$val['giname']}" alt=""> </td>
				<td style="color:red">
				￥:{$val['gp']}
				</td>
				<td>{$val['gb']?'上架':'下架'}</td>
				<td>{$val['ghot']?'热销':'不热销'}</td>
				<td>{$val['gnew']?'新':'不新'}</td>
				<td><a href="{:U('Goods/delete',['id'=>$val['gid']])}">删除</a></td>
			</tr>
		</foreach>
			<tr>
				<td colspan="8">{$page}</td>
			</tr>
	</table>
</block>
